package com.webcamtracker.image.color;

import com.webcamtracker.image.color.hsi.HSIColorSampler;
import com.webcamtracker.image.color.hsv.HSVColorSampler;
import com.webcamtracker.image.color.rgb.ColorSampler;
import com.webcamtracker.image.color.rgb.GrayScaleColorSampler;
import com.webcamtracker.image.color.rgb.RGBColorSampler;
import com.webcamtracker.image.color.rgb.RGBNColorSampler;


public class ColorSampleFactory {
    public static String[] value = {"RGB", "RGBN", "HSI", "GRAY_SCALE", "HSV"};


    public static String[] getValues() {
        return value;
    }

    public static ColorSampler getSampler(String type) {
        if (type.equals(value[RGB])) {
            return new RGBColorSampler();
        } else if (type.equals(value[RGBN])) {
            return new RGBNColorSampler();
        } else if (type.equals(value[HSI])) {
            return new HSIColorSampler();
        } else if (type.equals(value[GRAY_SCALE])) {
            return new GrayScaleColorSampler();
        } else if (type.equals(value[HSV])) {
            return new HSVColorSampler();
        } else if (type.equals(value[GEVERS])) {
            return new HSVColorSampler();
        }
        return null;
    }


    public static String getValue(int i) {
        return getValues()[i];
    }

    public static int RGB = 0;
    public static int RGBN = 1;
    public static int HSI = 2;
    public static int GRAY_SCALE = 3;
    public static int HSV = 4;
    public static int GEVERS = 5;


}
